[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ==                      Equality Operator

 exp1 == exp2            Test for exp1 equal to exp2
 exp1, exp2              any expression of type int, float, char, enum, or
                         related type

    == is a relational operator, yielding a value of either 1 (TRUE), if
    the expressions have the same value; or 0 (FALSE) if the expressions
    do not have the same value.  Type conversion is performed as
    necessary before comparing the expressions, according to the usual
    arithmetic conversions.  Here is an example:

           if (number == guess)
               ...
           do  {
               ...
           } while (ans == 'y');




See Also: Conversions != <= >= < > =
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson